package Exam.String;

public class StringD8 {
    public static void main(String[] args) {
        //反转字符串
        String result = reverser("abc");
        System.out.println(result);

    }
    public static  String reverser(String str){
        String result = "";
        for (int i = str.length() - 1; i >= 0; i--) {
            //i表示每一个字符串的索引（倒序）
                char c =str.charAt(i);
                result = result + c;
        }
        return result;
    }
}
